package com.senseuni.da.db.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.senseuni.da.db.entity.UpgradeEntity

@Dao
interface UpgradeDao {

    @Query("SELECT * FROM upgrade WHERE version_code= :versionCode LIMIT 1")
    fun findByVersion(versionCode: Int): UpgradeEntity?

    @Query("SELECT * FROM upgrade WHERE id= :id")
    fun findById(id: Long): UpgradeEntity?

    @Insert
    fun insert(entity: UpgradeEntity) : Long


}